package com.example.binpacking.controller;

import com.example.binpacking.model.Result;
import com.example.binpacking.model.dto.InterviewDto;
import com.example.binpacking.service.OperationInterviewTableService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/pelicanpsyc")
public class OperationInterviewTableController {
    @Autowired
    private OperationInterviewTableService operationInterviewTableService;
    @PostMapping("/api/handleinterview")
    public Result handleInterview(@RequestBody InterviewDto interviewDto) {
        operationInterviewTableService.handleAction(interviewDto.getAction(),interviewDto.getId(),interviewDto.getLoginid());
        return Result.success(200,"y","operation success");
    }
}
